package io.mya.modules.sys.vo;

import java.util.List;
import java.util.stream.Collectors;

public class PrometorUser {
    private long id;
    private String name;
    private List<PrometorUser> prometorUser;

    public PrometorUser(CandyUser user){
        this.id = user.getId();
        this.name = user.getUsername();
    }
    public PrometorUser(){}
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<PrometorUser> getPrometorUser() {
        return prometorUser;
    }

    public void setPrometorUser(List<PrometorUser> prometorUser) {
        this.prometorUser = prometorUser;
    }
    public static List<PrometorUser> prometorUsers(List<CandyUser> users){
        if(users==null||users.isEmpty())return null;
        return users.stream().map(e->new PrometorUser(e)).collect(Collectors.toList());
    }

}
